import request from '@/axios';
import {baseUrl} from '@/config/env';

export const list = () => {
    return request({
            url: baseUrl + '/start/sysMenu/AllMenu',
            method: 'get',
        }
    )
}
export const add = (data) => {
    return request({
            url: baseUrl + '/start/sysMenu/add',
            method: 'post',
            data: data
        }
    )
}
export const updateById = (data) => {
    return request({
            url: baseUrl + '/start/sysMenu/updateById',
            method: 'put',
            data: data
        }
    )
}
export const updateRow = (data, index) => {
    return request({
            url: baseUrl + '/start/sysMenu/updateById',
            method: 'put',
            data: data
        }
    )
}
export const deleteById = (id) => {
    return request({
            url: baseUrl + '/start/sysMenu/deleteById/' + id,
            method: 'delete',
        }
    )
}
export const deleteByIds = (ids) => {
    return request({
            url: baseUrl + '/start/sysMenu/deleteByIds',
            method: 'delete',
            data: ids
        }
    )
}
